Skip to content

Update Netlist Creation Function Documentation to Prevent Duplicates #2711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

ZohairZaidi
Copy link
Contributor

Description

Updated the documentation for the AtomNetlist and ClusteredNetlist classes to reflect the new behavior of the create_* functions. The documentation now specifies that these functions will return the existing ID if an element (block, port, pin, or net) with the specified name or ID already exists, instead of creating a duplicate

Related Issue

closes #2690

Motivation and Context

The update was necessary to avoid performance issues caused by unnecessary duplicate creations in the netlist

How Has This Been Tested?

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Sep 3, 2024
@ZohairZaidi
Copy link
Contributor Author

@AlexandreSinger, could you please review the changes to ensure they meet your expectations? Let me know if there's anything else I should adjust.

@AlexandreSinger
Copy link
Contributor

Hi @ZohairZaidi , the comments are not what we want to say over these functions. The issue is that these comments say "Create or return an existing" but in reality, if you try and get an existing one it will crash. I think the documentation just needs to be updated to say "Create ..." and then have a special note below it that will say that it crashes if something with that name already exists.

@ZohairZaidi
Copy link
Contributor Author

My apologies, fixed!

@AlexandreSinger
Copy link
Contributor

That looks better to me! Do not worry about the CI checks not passing for the NightlyTests; the CI server for those tests is down. Thank you!

@vaughnbetz
Copy link
Contributor

Thanks!

@vaughnbetz vaughnbetz merged commit e38c0f3 into verilog-to-routing:master Sep 19, 2024
36 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-cpp C/C++ code VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Netlist] Potential Issue When Re-Creating Elements in Atom and Clustered Netlists
3 participants